How many ways to solve a level in 10 moves? In 100 moves?
SPOILER ALERT: I give away some information about the first few levels of the game in this post. Here’s a twist on the usual. Let’s take a level — even a simple level. Let’s say you’re supposed to be able to solve it in 3 moves. How many ways are there to solve it in 3 moves? In 4 moves? In 1000 moves? Here’s some examples Level 1-1: there is only one way to solve this puzzle. If you play 1.d7 then the level is solved. Any other move and the level becomes impossible to solve, in any number of moves. So for level 1-1 we get the following patten: 1,0,0,0,0,0,… That is, there’s 1 way to solve the game in 1 move, and no ways to solve it in any more than one move. Level 1-2 is already a little more interesting. There’s clearly no way to solve the level in 1 move, and a little thought will convince you that there’s only one way to solve it in 2 moves. But there are four ways to solve it in three moves: 1.g7 2.d11 3.f7 1.g7 2.f7 3.d11 (note: I’m counting this as distinct because the moves are played in a different order) 1.d3 2.a7 3.d4 1.d3 2.d4 3.a7 So the pattern begins 0,1,4 Here is how it continues: 0,1,4,8,16,32,64,… and you’ll not be surprised to know that for n>=2, the number of ways of solving the game in n moves is just 2^n. World 1-3 is a similar story: the number of ways you can solve it goes like this: 0, 1, 2, 4, 8, 16, 32 and for n>=1 the number of ways of solving the game in n moves is 2^{n-1}. World 1-4 is similar to world 1-1: 0, 1, 0, 0, 0, 0, 0,… Similarly world 1-5 gives us 0, 0, 4, 0, 0, 0, 0,… But world 1-6 is *much* more interesting. The reason is that there are several essentially independent ways to waste time. You can waste one move by pulling the Rocky and then pulling it again to the same place (e.g. 1.c5 2.c5), and you can waste two moves by pulling the Rocky and then pulling it back (e.g. 1.c5 2.c10). Anyone who has heard the old chestnut “how many ways are there of climbing n stairs if at each stage you’re allowed to either step up one stair, or step up two?” will hence be unsurprised to hear that Fibonacci numbers are involved in this one. The number of solutions for world 1-6 is this: 0, 0, 1, 4, 12, 33, 88,… which, modulo the first zero, is sequence A027941 in Sloane’s Online Encyclopaedia of Integer Sequences. In particular, for n>=2, the number of ways of solving world 1-6 in precisely n moves is fibonacci(2n-3)-1, with fibonacci(m) the m’th fibonacci number. In general I guess these games follow some kind of Markov process, and it is not surprising that the number of ways you can solve them in n moves obeys a recurrence relation; this will be the case in general.